<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>微会员申请</title>
<meta name="viewport"
	content="width=device-width initial-scale=1.0  maximum-scale=1.0">
<%@ include file="/static/member/themes/ShiShangHong/header.jsp" %>

<script type="text/javascript">
	$(document).ready(function() {
		document.title = "微会员申请";
	});
	function checkForm(){
		
		var tel = $.trim($('#mobile').val());
		var nick = $.trim($('#nickName').val());
		var recommendCode = $.trim($('#recommendCode').val());
		var password = $.trim($('#password').val());
		var psd = $.trim($('#psd').val());
		var path = /^[0-9a-zA-Z]{6,50}$/;
		   var reg = new RegExp("^[0-9]*$");
		
		
		if(nick == null || nick ==''){
			alert("请输入您的姓名.");
			return false;
		}
		
		
		
		if(tel == null || tel ==''){
			alert('请输入手机号。');
			return false;
		}else{
			if(/^1[3,4,5,8]\d{9}$/.test(tel)||(/^15[8,9]\d{8}$/g.test(tel))){
				
			}else{
				alert('手机号输入不正确。');
				return false;
			}
		}
		
		if(  !reg.test(recommendCode)){
			alert('推荐码为数字！！');
			return false;
		}
		
		
		return true;
	}
</script>
<style type="text/css">
.redFont{
	color: #DD2F1D;
	font-weight:900;
	}
</style>
</head>
<body>
	<%@ include file="./header.jsp" %>
<!--主体-->
<div class="main">
<c:if test="${reg eq 'reg' }">
  <form id="inputForm" action="${ctxFront}/member/bind?uid=${uid}" method="post" onsubmit=" return checkForm();">
 							 <input type="hidden" name="action" value="reg" /> 
							<input	type="hidden" name="topage" value="${topage }" />
							<input	type="hidden" name="wechatId" value="${wechatId }" />
							<input	type="hidden" name="style" value="${style}"/>
    	<div class="p_mod o_address">
    		<h2 class="p_mod_title">注册帐号</h2>
            <div id="city">
    		<ul>
   			  <li><strong>手机：</strong><input  placeholder="请输入手机号作为登陆帐号" name="mobile" id="mobile" type="text" maxlength="15" class="required digits" style="width:75%;border:1px solid;height:30px;"/>
    			</li>
    			<li><strong>姓名：</strong><input id="nickName" placeholder="请输入姓名"  name="name"  type="text" id="nickName"	maxlength="50" class="required" style="width:75%;border:1px solid;height:30px;" /></li>
    			<li><span  style="color:red" >注意</span>:手机号将作为微信会员的唯一标记且一个微信号只能与一个手机号绑定，我们不会将您的任何信息泄露给任何第三方，请认真填写您的信息。<br/>
										暗号处填写您推荐人暗号,推荐成功后，您将有机会获得我们提供的奖品!</li>
    			 <li><strong>推荐码：</strong><input  placeholder="请输入推荐码" name="recommendCode" id="recommendCode" type="text" maxlength="10" class="digits" style="width:60%;border:1px solid;height:30px;"/>
    			<span  style="color:red" >选填</span> </li>
    			<li>
    			
    			
    			<h4 style="color:red" >${message }</h4>
				 <br>
				<h5 style="color:red">${regLottery}</h5>
    			</li>
    		
    		</ul>
            </div>
    	</div>
    	<div class="o_btn clearfix">
    		<input type="submit" class="o_btn_back ts1" value="注册" style="margin-bottom:10px;width:100%;" />
    	</div>
    </form>
    </c:if>
    			
</div>
<br><br>
<script type="text/javascript">
function checkform() {
    if ($('#username').val() == '' || $('#userpass').val() == '' || $('#userpass2').val() == '' || $('#truename').val() == '' ) {
        alert('请填写完所有项！');
        return false;
    }   
}
</script>
<!--底部-->
<!--底部-->

<c:if test="${uid ne '34' }">
		<jsp:include page="/static/member/themes/default/footer.jsp">
			<jsp:param value="${uid }" name="uid"/>
		</jsp:include>
	</c:if>
</body>
</html>
